//
//  SVGElement.h
//  Shake and Bake
//
//  Created by Antoine Quint on 12/08/07.
//  Copyright 2007 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <QuartzCore/QuartzCore.h>

@class Canvas;

@interface SVGElement : CALayer {
  Canvas *view;
	NSDictionary *attributes;
	NSColor *fillColor;
	NSColor *strokeColor;
	float strokeWidth;
	float groupOpacity;
	float fillOpacity;
	float strokeOpacity;
}

- (id)initWithAttributeDict:(NSDictionary *)attributesDict andView:(Canvas *)aView;
- (void)makePath:(CGContextRef)context;

+ (CATransform3D)parseTransform:(NSString *)attribute;
+ (CATransform3D)updateTransform:(CATransform3D)transform withCommand:(NSString *)command andParams:(NSArray *)params;

+ (NSColor *)parseColor:(NSString *)color;
+ (NSColor *)parseRGBColor:(NSString *)color;
+ (NSColor *)parseHexaColor:(NSString *)color;
+ (int)parseHexaChar:(char)c;

@end
